---
title: Command Event
sidebarTitle: Command
---

This event allows you to trigger a specifc flow when a command is sent to the bot. This command can be sent with an [continueChat HTTP request](/api-reference/chat/continue-chat) with a `command` message type or with the [Typebot.sendCommand](/deploy/web/html-javascript#commands) function if your bot is embedded on a website.

You assign a unique command name for each node and you can optionally resume the flow after the command is sent.

<Frame>
  <img src="/images/events/command.avif" alt="Command event in Typebot editor" />
</Frame>

## Return to main flow

By default, when an event is executed, the session will end and not return to the main flow. Use a [Return block](/editor/blocks/logic/return) to return to the main flow. This allows you to have the flexibility to conditionally end the session.